import { CHAT_URL } from '@/components/Chat/constants'
import ChatComponent from '@/components/Chat/index'
// import { TitleIconBg } from '@/components/bs-comp/cardComponent'
// import { AssistantIcon } from '@/components/bs-icons/assistant'
import { useAssistantStore } from '@/store/assistantStore'
import { useTranslation } from 'react-i18next'
import '../css/styles.css'

export default function TestChat({ assistantId, guideQuestion, propsRef, useName,modelName='' }) {
  const { assistantState } = useAssistantStore()
  const { t } = useTranslation()

  return (
    <div className="bs-chat-bg relative h-full px-4">
      <div className="absolute left-0 top-0 z-10 flex h-[48px] w-full items-center gap-2 bg-[#fff] px-[16px] py-[10px] shadow-sm">
        {/* <TitleIconBg className="" id={assistantState.id}> */}
        {/* <TitleIconBg className="" id={'e11814b8-676e-4595-a939-2f6bc477eac5'}>
          <AssistantIcon />
        </TitleIconBg> */}
        <span className="application-edit-debug-title moduleName">{t('build.debugPreview')}</span>
      </div>
      <div ref={propsRef} className="h-full">
        <ChatComponent
          clear
          questions={guideQuestion}
          chatUrl={CHAT_URL}
          assistantId={assistantId}
          prompt={assistantState.prompt}
          useName={useName}
          modelName={modelName}
        ></ChatComponent>
      </div>
    </div>
  )
}
